<?php /* Template Name: Criador */ ?>

<?php

//Carrega as inforamções de usuário da página
$pag_atual = get_page($post->ID);
$id_user = $pag_atual->post_author;
$user_info = get_userdata($id_user);





?>

<style>
<!--
.cont-topo       {width: 980px; background-color: #ffffff; display: table; }
.bar-page 	     {width: 950px; height: 65px; margin: 0 10px 0 20px;}
.cont-miolo      {width: 630px; margin: 0 0 0 20px; float: left; background-color: #ffffff; display: table;}
.cont-direita    {width: 300px; margin: 0 10px 0 0; float: right; background-color: #ffffff; display: table;}
.cont-galeria    {width: 630px; height: 450px; margin: 0; float: left; background-color: #efefef;}
.cont-balao      {width: 628px; height: 210px; margin: 0; float: left; border: 1px solid #efefef;}
.cont-carrossel  {width: 630px; height: 350px; margin: 0; float: left; background-color: #efefef;}
.cont-anuncio 	 {width: 630px; height: 320px; margin: 0; float: left; background-color: #efefef;}
.cont-artigo 	 {width: 630px; height: 240px; margin: 0; float: left; background-color: #efefef;}
.cont-outros 	 {width: 630px; height: 240px; margin: 0; float: left; background-color: #efefef;}
.cont-direitos 	 {width: 950px; height: 50px; margin: 0 10px 0 20px; float: left;}
.cont-contatos 	 {width: 300px; height: 420px; float: right;}
.cont-criador 	 {width: 300px; float: right;}
.cont-formulario {width: 300px; height: 440px; float: right;}
.cont-miolo-pub  {width: 980px; height: 60px;}

.balao-dialogo       {position: relative; background-color: #c0dade; border-radius: 0; width: 629px; height: 75px; margin: 0 auto;} 
.balao-dialogo:after {content: ''; position: absolute; width: 0; height: 0; border: 12px solid #ffffff; border-top-color: #c0dade; top: 100%; left: 8%; margin-left: -15px;}


/* Bloco abas */
* { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;  margin: 0; padding: 0; }
#wrap { width: 100%; margin: 0 auto;}
#tabwrap {background: #fff; overflow: hidden; width: 100%; min-height: 480px; margin: 0 auto; box-shadow: 0 0 20px #ddd; border: 1px solid #ddd;}
#tabs { overflow: hidden; background: #777; }
#tabs li { list-style: none; }
#tabs li a {float: left; display: block; padding: 10px; color: #fff; width: 50%; text-decoration: none; text-align: center; border-right: 1px solid #555; border-left: 1px solid #888; font-size: 15px; text-shadow: 1px 1px 0 #000;}
#tabs li a:hover { background: #666; }
#tabs li:first-child a { border-left: 0; }
#tabs li:last-child a { border-right: 0; }
#tabs li.current a {background: #fff; color: #666; text-shadow: 1px 1px 0 #fff;}
#content > div {clear: both; padding: 20px; line-height: 19px; color: #666; text-shadow: 1px 1px 0 #fff; display: none;}
#content .current { display: block; }
#content #home.first { display: block; }
#content p { margin: 0 0 20px 0;} 
/* Bloco abas */


/* Formulario lateral direita */
#contact-form {background-color: #ffffff; width:260px; padding: 0; margin: 0;}
#contact-form h1 {font-size:14px; font-weight: normal;} 
#contact-form input,   
#contact-form select,   
#contact-form textarea,   
#contact-form label {font-size: 12px; margin-bottom: 2px;}  
#contact-form input,   
#contact-form select,   
#contact-form textarea {width:260px; border: 1px solid #CEE1E8; margin-bottom: 5px; padding:4px;}
#contact-form input:focus,   
#contact-form select:focus,   
#contact-form textarea:focus {border: 1px solid #AFCDD8; background-color: #EBF2F4;}
#contact-form textarea {height:90px; resize: none;}
#contact-form label {display:block;}
#contact-form .required {font-weight:bold; color:#F00;} 
#contact-form #submit-button {width: 100px; background-color:#333; color:#FFF; border:none; display:block; float:rightright; margin-bottom:0px; margin-right:6px; background-color:#8FB5C1; -moz-border-radius:8px; } 
#contact-form #submit-button:hover {background-color: #A6CFDD;}
#contact-form #submit-button:active {position:relative; top:1px;}  
#req-field-desc {font-style:italic; font-size: 12px;}  
      
/* Remove box shadow firefox, chrome and opera put around required fields. It looks rubbish. */  
input:required, textarea:required {-moz-box-shadow:none; -webkit-box-shadow:none; -o-box-shadow:none; box-shadow:none;}

/* Normalize placeholder styles */ 

/* chrome, safari */  
::-webkit-input-placeholder {color:#CCC; font-style:italic;}
/* mozilla */  
input:-moz-placeholder, textarea:-moz-placeholder {color:#CCC; font-style:italic;}  
/* ie (faux placeholder) */  
input.placeholder-text, textarea.placeholder-text {color:#CCC; font-style:italic;} 

/* Formulario lateral direita */    
    
     
-->
</style>


<?php 

//echo get_user_meta(wp_get_current_user()->ID, 'pais', true);
//ll_meta_for_user = get_user_meta( $post_author->ID );
//print_r( $all_meta_for_user );


//echo $user_info->user_url;





?>






<?php
function do_dialog_baloon_creator ($value) {
	?>
	<div class="balao-dialogo">
		<div style="font-size: 24px; margin: auto 30px; padding-top: 10px;">
		Sou criador de<br />Exóticos, Psitacídeos
		</div>
	</div>
	<div style="width: 590px; float: right; margin: 25px auto;">
		<span style="font-size: 18px;">
		<?php echo $value;?>
		</span>
	</div>
<?php 
}
?>







<?php get_header(); ?>
<body>
	
<div id="tudo">
<div id="topo"><?php include_once MODULOS.'/topo.php'; ?></div><!-- Fim div topo -->
<?php do_vertical_space('20'); ?>


<div id="corpo">
<?php do_vertical_space('15'); ?>
<div class="breadcrumb" style="margin-left: 20px;"><?php the_breadcrumb(); ?></div>
<?php do_vertical_space('10'); ?>	
	
	<div class="cont-topo">		
		<div class="bar-page" style="border-bottom: 2px #efefef solid;"><?php conteudo_barra_page ('Link direto:&nbsp;'); ?></div>
		<?php do_vertical_space('20'); ?>		
		<div class="bar-page"><?php titulo_barra_page ('Página do criador de aves', $pag_atual->post_title); ?></div>
		<?php do_vertical_space('20'); ?>
	</div><!-- Fim div conteiner-topo -->
	
	
	<div class="cont-miolo">
		<div class="cont-galeria">Galeria de imagens</div>
		<div class="clr"></div>
		<?php do_vertical_space('20'); ?>
		<div class="cont-balao "><?php do_dialog_baloon_creator(get_user_meta($user_info->ID, 'especies', true));?></div>
		<div class="clr"></div>
		<?php do_vertical_space('20'); ?>
		<div class="cont-carrossel">Carrossel</div>
		<div class="clr"></div>
		<?php do_vertical_space('20'); ?>
		<div class="cont-anuncio">Anúncios</div>
		<div class="clr"></div>
		<?php do_vertical_space('20'); ?>
		
		
		<div class="cont-artigo">
		<?php 
		
		
		
		$the_query = new WP_Query( 'author='.$id_user );
		// The Loop
		while ( $the_query->have_posts() ) :
		$the_query->the_post();
		echo '<li>' . get_the_title() . '</li>';
		endwhile;
		
		
		//echo $id_user;
		
		
		
		?>
		
		
		</div><!-- Fim div cont-artigo -->
		<div class="clr"></div>
		<?php do_vertical_space('20'); ?>
		
		
		<div class="cont-outros">Outros</div>
		<div class="clr"></div>
		<?php do_vertical_space('20'); ?>
	</div><!-- Fim div cont-miolo -->
	
	
	<div class="cont-direita">
		<div class="cont-contatos">
			<div style="margin-left: 10px;"><span style="<?php fonte_cor('preto24');?>">Contatos</span></div>
			<?php do_vertical_space('15'); ?>
			<ul style="list-style-type: none; padding: 0; margin: 0 0 0 10px;">
				<li>
					<div style="float: left;"><img alt="" src="<?php echo bloginfo('template_directory')?>/images/icon/email.png" width="20" height="20" /></div>
					<div style="float: left;"><span style="<?php fonte_cor('preto16');?>">Email</span></div>
					<br />
					<span style="<?php fonte_cor('azul16');?>"><a href="mailto:<?php echo $user_info->user_email;?>"><?php echo $user_info->user_email;?></a></span>
				</li>
				<li style="border-bottom: 2px solid #efefef;"> &nbsp; </li>
				<li>
					<br />
					<div style="float: left;"><img alt="" src="<?php echo bloginfo('template_directory')?>/images/icon/mobile-phone.png" width="20" height="20" /></div>
					<div style="float: left;"><span style="<?php fonte_cor('preto16');?>">Telemóvel</span></div>
					<br />
					<span style="<?php fonte_cor('azul16');?>"><?php echo get_user_meta($user_info->ID, 'telefone', true);?></span>
				</li>
				<li style="border-bottom: 2px solid #efefef;"> &nbsp; </li>
				<li>
					<br />
					<div style="float: left;"><img alt="" src="<?php echo bloginfo('template_directory')?>/images/icon/laptop.png" width="20" height="20" /></div>
					<div style="float: left;"><span style="<?php fonte_cor('preto16');?>">Página web</span></div>
					<br />
					<span style="<?php fonte_cor('azul16');?>"><a href="<?php echo $user_info->user_url;?>" target="_blank"><?php echo $user_info->user_url;?></a></span>
					<?php do_vertical_space('7'); ?>
					<div style="margin-left: 40px;"><a href="<?php echo $user_info->user_url;?>" target="_blank" ><img alt="" src="<?php echo bloginfo('template_directory')?>/images/criador/page/ripiranga.png" width="150" height="150" /></a></div>
				</li>
			</ul>
		</div>
		<div class="clr"></div>
		<?php do_vertical_space('20'); ?>
		
		
		<div class="cont-criador">
			<div style="margin-left: 10px;"><span style="<?php fonte_cor('preto24');?>">Criador</span></div>
			<?php do_vertical_space('15'); ?>
			<ul style="list-style-type: none; padding: 0; margin: 0 0 0 10px;">
				<li>
					<div style="float: left;"><img alt="" src="<?php echo bloginfo('template_directory')?>/images/icon/globe.png" width="20" height="20" /></div>
					<div style="float: left;"><span style="<?php fonte_cor('preto16');?>">Localidade</span></div>
					<br />
					<span style="<?php fonte_cor('azul16');?>"><?php echo get_user_meta($user_info->ID, 'concelho', true);?></span>
				</li>
				<li style="border-bottom: 2px solid #efefef;"> &nbsp; </li>
				<li>
					<br />
					<div style="float: left;"><img alt="" src="<?php echo bloginfo('template_directory')?>/images/icon/modalidade.png" width="20" height="20" /></div>
					<div style="float: left;"><span style="<?php fonte_cor('preto16');?>">Modalidade</span></div>
					<br />
					<span style="<?php fonte_cor('azul16');?>"><?php echo get_user_meta($user_info->ID, 'modalidade', true);?></span>
				</li>
				<li style="border-bottom: 2px solid #efefef;"> &nbsp; </li>	
				<li>
					<br />
					<div style="float: left;"><img alt="" src="<?php echo bloginfo('template_directory')?>/images/icon/filiado.png" width="20" height="20" /></div>
					<div style="float: left;"><span style="<?php fonte_cor('preto16');?>">Filiado nas Coletividades</span></div>
					<br />
					<span style="<?php fonte_cor('azul16');?>"><?php echo get_user_meta($user_info->ID, 'clube', true);?></span>
				</li>
				<li>
					<div style="float: left; width: 20px;"> &nbsp; </div>
					<span style="<?php fonte_cor('azul16');?>"><?php echo get_user_meta($user_info->ID, 'clube2', true);?></span>
				</li>
				<li>
					<div style="float: left; width: 20px;"> &nbsp; </div>
					<span style="<?php fonte_cor('azul16');?>"><?php echo get_user_meta($user_info->ID, 'clube3', true);?></span>
				</li>								
				<li style="border-bottom: 2px solid #efefef;"> &nbsp; </li>					
				<li>
					<br />
					<div style="float: left;"><img alt="" src="<?php echo bloginfo('template_directory')?>/images/icon/id-card.png" width="20" height="20" /></div>
					<div style="float: left;"><span style="<?php fonte_cor('preto16');?>">Identificação do Criador</span></div>
					<br />
					<span style="<?php fonte_cor('azul16');?>">STAM <?php echo $user_info->stam;?></span>
					<?php do_vertical_space('7'); ?>
					<div style="margin-left: 40px;"><img alt="" src="<?php echo bloginfo('template_directory')?>/images/icon/STAM.png" width="150" height="95" /></div>
				</li>
				<li style="border-bottom: 2px solid #efefef;"> &nbsp; </li>
								<li>
					<br />
					<div style="float: left;"><img alt="" src="<?php echo bloginfo('template_directory')?>/images/icon/unlock.png" width="20" height="20" /></div>
					<div style="float: left;"><span style="<?php fonte_cor('preto16');?>">Licença do Criador</span></div>
					<br />
					<span style="<?php fonte_cor('azul16');?>"><?php echo $user_info->licenca;?></span>
					<?php do_vertical_space('7'); ?>
					<div style="margin-left: 40px;"><img alt="" src="<?php echo bloginfo('template_directory')?>/images/icon/licenca.png" width="150" height="95" /></div>
				</li>
			</ul>
		</div><!-- Fim div cont-criador -->
		<div class="clr"></div>
		<?php do_vertical_space('40'); ?>
		
		
		<div class="cont-formulario">
			<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
			<script type="text/javascript">
			$(function(){
				$('#tabs li a').click(function(e){
					$('#tabs li, #content .current').removeClass('current').removeClass('fadeInLeft');
					$(this).parent().addClass('current');
					var currentTab = $(this).attr('href');
					$(currentTab).addClass('current');
					e.preventDefault();
				});
			});
		    SyntaxHighlighter.all();
			</script>
			<div id="wrap">	
				
				<div id="tabwrap">
						
					<ul id="tabs">
						<li class="current"><a href="#contato">Contatar Criador</a></li>
						<li><a href="#recomendacao">Recomendar</a></li>
					</ul>
					<div id="content">
						<div id="contato" class="current animated fadeInLeft">
							<div id="contact-form" class="clearfix">  
			         			<h1>Enviar um Email</h1><br />
						        <form method="post" action="process.php">
									<label for="message">Texto <span class="required">*</span></label>  
						            <textarea id="message" name="message" placeholder="Sua mensagem" required="required" data-minlength="20"></textarea>			          
						            <label for="name">Name <span class="required">*</span></label>  
						            <input type="text" id="name" name="name" value="" placeholder="Seu Nome" required="required" autofocus="autofocus" /> 
						            <label for="email">Telefone <span class="required">*</span></label>  
						            <input type="email" id="telefone" name="telefone" value="" placeholder="Seu telefone" required="required" />
						            <label for="telephone">Email <span class="required">*</span></label>  
						            <input type="tel" id="email" name="email" value="" value="" placeholder="seu-email@example.com" required="required" />
						            <br /><br />
						            <input type="checkbox" id="email_copy" name="email_copy" value="1" style="float: left; width: auto; margin: 0 5px 0 0;"/>
						            <label>Enviar uma cópia para seu e-mail</label><input type="submit" value="Enviar email!" id="submit-button" style="margin: 5px 0 10px 0;"/>  
						            <p id="req-field-desc"><span class="required">*</span> Campos de preenchimento obrigatório</p>  
						        </form>  
						    </div> 
						</div>
						
						<div id="recomendacao" class="animated fadeInLeft">
							<div id="contact-form" class="clearfix">  
			         			<h1>Recomendar a um amigo</h1><br />
						        <form method="post" action="process.php">
									<label for="message">Texto <span class="required">*</span></label>  
						            <textarea id="message" name="message" placeholder="Sua mensagem" required="required" data-minlength="20"></textarea>
						            <label for="name">Seu Nome <span class="required">*</span></label>  
						            <input type="text" id="name" name="name" value="" placeholder="Seu Nome" required="required" autofocus="autofocus" /> 
						            <label for="email">Seu Email <span class="required">*</span></label>  
						            <input type="email" id="email" name="email" value="" value="" placeholder="emai-destinatario@example.com" required="required" />
						            <label for="emaild">Email destinatário <span class="required">*</span></label>  
						            <input type="email" id="emaild" name="emaild" value="" value="" placeholder="seu-email@example.com" required="required" />			            
						            <br /><br />
						            <input type="submit" value="Enviar email!" id="submit-button" style="margin: 5px 0 10px 0;"/>  
						            <p id="req-field-desc"><span class="required">*</span> Campos de preenchimento obrigatório</p>  
						        </form>  
						    </div>
						</div>
						
					</div>
				</div>
				<div id="instructions">
					<script type="syntaxhighlighter" class="brush: css"><![CDATA[
						#tabwrap {background: #fff; overflow: hidden; min-height: 440px; margin: 60px auto; box-shadow: 0 0 20px #ddd; border: 1px solid #ddd;}
						#tabs li { list-style: none; }
						#tabs li a {float: left; display: block; background: #777; padding: 10px; color: #fff; width: 50%; text-decoration: none; text-align: center; border-right: 1px solid #555; border-left: 1px solid #888; font-size: 15px; text-shadow: 1px 1px 0 #000;}
						#tabs li a:hover { background: #666; }
						#tabs li:first-child a { border-left: 0; }
						#tabs li:last-child a { border-right: 0; }
						#tabs li.current a {background: #fff; color: #666; text-shadow: 1px 1px 0 #fff;}
						#content > div {clear: both; padding: 20px; line-height: 19px; color: #666; text-shadow: 1px 1px 0 #fff; display: none;}
					]]></script>
				</div>
			</div>
		</div><!-- Fim div cont-formulario -->
		<?php do_vertical_space('20'); ?>
		<div class="clr"></div>
	</div><!-- Fim div cont-direita -->
	
	
	<div class="cont-direitos" style="border-top: 2px #efefef solid;">
		<?php direito_barra_page ('Página de detalhes do criador de aves', $pag_atual->post_title);?>
	</div>


</div><!-- Fim div corpo -->


<?php do_vertical_space('20'); ?>	
<div class="cont-miolo-pub"><?php add_google_pub_bloco_2x468x60 (); ?></div>
<?php do_vertical_space('20'); ?>		
</div><!-- Fim div tudo -->
<?php get_footer(); ?>
</body>
</html>